package com.aoyama.office.openoffice.controller;

import com.aoyama.office.openoffice.service.FileService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/")
public class FileController {

    @Resource
    FileService fileService;

//    @ApiOperation(value = "系统文件在线预览接口 by tarzan")
    @PostMapping("/api/file/onlinePreview")
    public void onlinePreview(@RequestParam("url") String url, HttpServletResponse response) throws Exception{
        fileService.onlinePreview(url,response);
    }

    //    @ApiOperation(value = "系统文件在线预览接口 by tarzan")
    @GetMapping("/test")
    public String onlinePreview() throws Exception{
        return "test-----";
    }
}
